
        /*
        @Author :mrduongnv@gmail.com
            ApplicationConfigProperties class is a singleton class which help to store value which
            is common throught the application.It uses the main-config.properties file to store the values.
            Again that values are used in applicationContext.xml file to set the recordSizeMap.
            This map value ll be availble to where we want by injecting this class only no need to create object of this class.
        */
package com.serviceprovider.business.utility;

//~--- JDK imports ------------------------------------------------------------

import java.util.Map;

public class ApplicationConfigProperties {
    private String captchaPrivateKey;
    private String captchaPublicKey;

    // dateFormt can be used to specify a common dateformat  through out the application.
    private String dateFormat;

    // this ll be default record size
    private int     defaultRecordSize;
    private int     maxPayeesPerSP;
    private Integer newImportTransactionStatus;

    // map of records size for all jsp pages ll be stroe here
    private Map<String, Integer> recordSizeMap;
    private Map<String, String>  uiThemes;

    public String getCaptchaPublicKey() {
        return captchaPublicKey;
    }

    public void setCaptchaPublicKey(String captchaPublicKey) {
        this.captchaPublicKey = captchaPublicKey;
    }

    public String getCaptchaPrivateKey() {
        return captchaPrivateKey;
    }

    public void setCaptchaPrivateKey(String captchaPrivateKey) {
        this.captchaPrivateKey = captchaPrivateKey;
    }

    public String getDateFormat() {
        return dateFormat;
    }

    public void setDateFormat(String dateFormat) {
        this.dateFormat = dateFormat;
    }

    public int getDefaultRecordSize() {
        return defaultRecordSize;
    }

    public void setDefaultRecordSize(int defaultRecordSize) {
        this.defaultRecordSize = defaultRecordSize;
    }

    public Map<String, Integer> getRecordSizeMap() {
        return recordSizeMap;
    }

    public void setRecordSizeMap(Map<String, Integer> recordSizeMap) {
        this.recordSizeMap = recordSizeMap;
    }

    // this method ll be used to get the record size for jsp page if not exist in map then ll return the deafult record size.
    public int getRecordSize(String key) {
        return (this.recordSizeMap.get(key) == null)
               ? this.defaultRecordSize
               : this.recordSizeMap.get(key);
    }

    public int getMaxPayeesPerSP() {
        return maxPayeesPerSP;
    }

    public void setMaxPayeesPerSP(int maxPayeesPerSP) {
        this.maxPayeesPerSP = maxPayeesPerSP;
    }

    public Map<String, String> getUiThemes() {
        return uiThemes;
    }

    public void setUiThemes(Map<String, String> uiThemes) {
        this.uiThemes = uiThemes;
    }

    public Integer getNewImportTransactionStatus() {
        return newImportTransactionStatus;
    }

    public void setNewImportTransactionStatus(Integer newImportTransactionStatus) {
        this.newImportTransactionStatus = newImportTransactionStatus;
    }
}



